var toolBarAjaxPath="/RemoteSensing/order/cancelOrder.action/";
var commentsAjaxPath="";

//取消订单
function CancelOrder(orderId){
	if(orderId){
		if(confirm("你确定要取消订单吗？")){
			$.ajax({
				type:"Get",
				url:toolBarAjaxPath + orderId,
				dataType:"json",
				success:function(result){
					if(result.SUCCESS && result.SUCCESS=="SUCCESS"){
						alert("订单取消成功！");
						var t=new Date();
						window.location.href="/RemoteSensing/order/listOrders.action?r=" + Math.random();
					}else{
						alert("取消过程中出现问题！");
					}
				}
			});
		}
	}
}

function showOrder(orderId){
	if(orderId){
		$.ajax({
			type:"Get",
			url: "/RemoteSensing/order/item.action?orderId=" + orderId,
			dataType:"json",
			success:function(result){
				if(result.ERROR && result.ERROR){
					window.open("/RemoteSensing/order/item.action?orderId=" + orderId);
				}else{
					alert("获取订单信息失败！");
				}
			}
		});
	}
}

function payOrder(orderId){
	window.open("/RemoteSensing/order/payForOrder.action?orderId=" + orderId);
}




